/***************************************************************************** 
** cpu/arm1136/imapx200/ioinit.S
** 
** Copyright (c) 2009~2014 ShangHai Infotm Ltd all rights reserved. 
** 
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
** Description: Software reset cpu.
**
** Author:
**     Warits   <warits.wang@infotm.com>
**      
** Revision History: 
** ----------------- 
** 1.1  XXX 07/21/2010 XXX	Warits
*****************************************************************************/

#include <asm/arch/imapx200.h>

.globl imapx200_init_gpio
imapx200_init_gpio:
#ifdef CONFIG_SYS_INIT_GPIO0
	ldr r1, =CONFIG_SYS_INIT_GPIO0
	ldr r2, =CONFIG_SYS_INIT_GPIO0_VAL
	str r2, [r1]
#ifdef CONFIG_SYS_INIT_GPIO1
	ldr r1, =CONFIG_SYS_INIT_GPIO1
	ldr r2, =CONFIG_SYS_INIT_GPIO1_VAL
	str r2, [r1]
#ifdef CONFIG_SYS_INIT_GPIO2
	ldr r1, =CONFIG_SYS_INIT_GPIO2
	ldr r2, =CONFIG_SYS_INIT_GPIO2_VAL
	str r2, [r1]
#ifdef CONFIG_SYS_INIT_GPIO3
	ldr r1, =CONFIG_SYS_INIT_GPIO3
	ldr r2, =CONFIG_SYS_INIT_GPIO3_VAL
	str r2, [r1]
#ifdef CONFIG_SYS_INIT_GPIO4
	ldr r1, =CONFIG_SYS_INIT_GPIO4
	ldr r2, =CONFIG_SYS_INIT_GPIO4_VAL
	str r2, [r1]
#endif
#endif
#endif
#endif
#endif

	mov pc, lr

